const express = require('express');
// 导入相应逻辑的处理模块
const { insertPlanItemHandler,
        deletePlanItemHandler,
        getPlanItemHandler,
        updatePlanItemHandler,
        toggleCompletedStatusHandler
      } = require('../handler/planItem');

const router = express.Router();

// 配置路由
router.post('/insertPlanItem', insertPlanItemHandler);
router.post('/deletePlanItem', deletePlanItemHandler);
router.post('/getPlanItem', getPlanItemHandler);
router.post('/updatePlanItem', updatePlanItemHandler);
router.post('/toggleCompletedStatus', toggleCompletedStatusHandler);

module.exports = router;


/**
 * 增 /insertPlanItem
 * 删 /deletePlanItem
 * 查 /getPlanItem
 * 改 /updatePlanItem
 * 切换计划事项完成状态  /toggleCompletedStatus
 * */ 